package Decorator;

/**
 * @Author: Cjj
 * 使用 RedShapeDecorator 来装饰 Shape 对象
 */
public class DecoratorPatternDemo {
    public static void main(String[] args) {
        Circle circle = new Circle();
     ShapeDecorator redCircle =  new RedShapeDecorator(new Circle());
     ShapeDecorator redRectangle =  new RedShapeDecorator(new Rectangle());

     System.out.print("Circle with normal border");
     circle.draw();

     System.out.print("\nCircle of red border");
     redCircle.draw();

     System.out.print("\nRectangle of red border");
     redRectangle.draw();
    }
}
